package wen.recommend.dao;

import wen.recommend.beans.User;
import wen.recommend.util.BeanHandler;



public class UserDao extends BaseDao {
	
	public boolean validateUser(String userName, String userPass) {
		String sql = "select * from user_tb where username = ? and password = ?";
		Object o = find(sql, new Object[]{userName , userPass}, new BeanHandler(User.class));
		return o != null;
	}

	public boolean validateAdmin(String adminName, String adminPass) {
		// TODO Auto-generated method stub
		String sql = "select * from user_tb where username = ? and password = ? ";
		Object o = find(sql, new Object[]{adminName , adminPass}, new BeanHandler(User.class));
		return o != null;
	}

}
